function blankOutUndefined(vari) { 
	if (vari == undefined) {
		vari = '';
	}
	return vari;
}

function makeUrl(s) {
	var r=s.replace(/^http.*:\/\//,'')
	if (r==s) {
		s= 'http://' + s;
	}
	return s
}

function account_tab() {
	//add My Account button to tab
	var text = document.createTextNode('Reset User');
	var func = 'delete_user()';
	make_button(text,func);
}


function check_account(prefs) {
	//Check for existence of account prefs
	var accesskey = prefs.getString("accesskey");
	if (accesskey == '') {
		return false;
	}
	return true;
}

function bg_main() {
	//check if account prefs are saved
	var prefs = new gadgets.Prefs();

	var acct_status = check_account(prefs);
	acct_status=false;
	if (!acct_status) {
		//Try to obtain from boru DB
		oauth_init();
	}
}

